# official: gitlab
# https://gitee.com/mirrors/buildroot.git
# https://github.com/buildroot/buildroot
# git://git.buildroot.net/buildroot
# https://git.buildroot.net/buildroot

BR_GIT_URL_gitlab		?= https://gitlab.com/buildroot.org/buildroot.git
BR_GIT_URL_github		?= https://github.com/buildroot/buildroot
BR_GIT_URL_gitee		?= https://gitee.com/mirrors/buildroot.git
ifdef BR_GIT_URL_$(NET_SELECT)
BR_GIT_URL				?= $(BR_GIT_URL_$(NET_SELECT))
else
BR_GIT_URL				?= $(BR_GIT_URL_gitlab)
endif
BR_SITE					?= https://buildroot.org/downloads
BR_BRANCH				?= master

BR_VERSION				?= 2024.11
BR_BASE					?= buildroot-$(BR_VERSION)
BR_PKG					?= $(BR_BASE).tar.xz
BR_SAVECONF				?= $(BR_CONFIG)
BR_TARGETS				?= all

RFS_BR_OVERLAY			+= $(EEL_CHG_DIR)/rootfs/br-rfs-overlay
# RFS_BR_OVERLAY		+= $(O_OTCL_DIR)/export

KL_ARGS_br				?= root=/dev/vda rw init=/linuxrc
RFS_IMAGE_br			= $(EEL_OUT_DIR)/$(ARCH)/$(BR_VER_DIR)/$(BR_CONFIG)/images/rootfs.$(RFS_TYPE)
INITRD_FILE				= $(EEL_OUT_DIR)/$(ARCH)/$(BR_VER_DIR)/$(BR_CONFIG)/images/rootfs.cpio


BR_SRC_DIR				?= rootfs
BR_GIT_DIR				?= $(BR_SRC_DIR)/buildroot-repo
BR_VER_DIR				?= $(BR_SRC_DIR)/$(BR_BASE)

S_BR_DIR				= $(EEL_SRC_DIR)/$(BR_VER_DIR)
G_BR_DIR				= $(EEL_SRC_DIR)/$(BR_GIT_DIR)
O_BR_DIR				= $(EEL_OUT_DIR)/$(ARCH)/$(BR_VER_DIR)/$(BR_CONFIG)
ifneq ($(S_BR_DIR),$(wildcard $(S_BR_DIR)))
S_BR_DIR				= $(G_BR_DIR)
endif
